using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._CartographyTools._Annotation
{
    /// <summary>
    /// <para>Convert Labels To Annotation</para>
    /// <para>Converts labels to annotation for a single layer or the entire map. Both standard annotation and feature-linked annotation can be created.</para>
    /// <para>将标注转换为单个图层或整个地图的注记。可以创建标准注记和要素链接注记。</para>
    /// </summary>    
    [DisplayName("Convert Labels To Annotation")]
    public class ConvertLabelsToAnnotation : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public ConvertLabelsToAnnotation()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_input_map">
        /// <para>Input Map</para>
        /// <para>The input map.</para>
        /// <para>输入映射。</para>
        /// </param>
        /// <param name="_conversion_scale">
        /// <para>Conversion Scale</para>
        /// <para>The scale at which labels will be converted. If a reference scale is set on the map, the reference scale will be used for symbol sizing and annotation feature class creation, but conversion will occur at this scale.</para>
        /// <para>标签转换的规模。如果在地图上设置了参考比例，则参考比例将用于符号大小调整和注记要素类的创建，但转换将在此比例下进行。</para>
        /// </param>
        /// <param name="_output_geodatabase">
        /// <para>Output Geodatabase</para>
        /// <para>The workspace where the output feature classes will be saved. The workspace can be an existing geodatabase or an existing feature dataset. If this is not the same database used by all the layers in the map, the feature-linked option will be disabled.</para>
        /// <para>将保存输出要素类的工作空间。工作空间可以是现有地理数据库或现有要素数据集。如果这与地图中所有图层使用的数据库不同，则将禁用要素链接选项。</para>
        /// </param>
        public ConvertLabelsToAnnotation(object _input_map, double? _conversion_scale, object _output_geodatabase)
        {
            this._input_map = _input_map;
            this._conversion_scale = _conversion_scale;
            this._output_geodatabase = _output_geodatabase;
        }
        public override string ToolboxName => "Cartography Tools";

        public override string ToolName => "Convert Labels To Annotation";

        public override string CallName => "cartography.ConvertLabelsToAnnotation";

        public override List<string> AcceptEnvironments => ["annotationTextStringFieldLength", "configKeyword"];

        public override object[] ParameterInfo => [_input_map, _conversion_scale, _output_geodatabase, _anno_suffix, _extent, _generate_unplaced.GetGPValue(), _require_symbol_id.GetGPValue(), _feature_linked.GetGPValue(), _auto_create.GetGPValue(), _update_on_shape_change.GetGPValue(), _output_group_layer, _updated_geodatabase, _which_layers.GetGPValue(), _single_layer, _multiple_feature_classes.GetGPValue(), _merge_label_classes.GetGPValue()];

        /// <summary>
        /// <para>Input Map</para>
        /// <para>The input map.</para>
        /// <para>输入映射。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Map")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _input_map { get; set; }


        /// <summary>
        /// <para>Conversion Scale</para>
        /// <para>The scale at which labels will be converted. If a reference scale is set on the map, the reference scale will be used for symbol sizing and annotation feature class creation, but conversion will occur at this scale.</para>
        /// <para>标签转换的规模。如果在地图上设置了参考比例，则参考比例将用于符号大小调整和注记要素类的创建，但转换将在此比例下进行。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Conversion Scale")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public double? _conversion_scale { get; set; }


        /// <summary>
        /// <para>Output Geodatabase</para>
        /// <para>The workspace where the output feature classes will be saved. The workspace can be an existing geodatabase or an existing feature dataset. If this is not the same database used by all the layers in the map, the feature-linked option will be disabled.</para>
        /// <para>将保存输出要素类的工作空间。工作空间可以是现有地理数据库或现有要素数据集。如果这与地图中所有图层使用的数据库不同，则将禁用要素链接选项。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Geodatabase")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _output_geodatabase { get; set; }


        /// <summary>
        /// <para>Annotation Suffix</para>
        /// <para>The suffix that will be added to each new annotation feature class. This suffix will be appended to the name of the source feature class for each new annotation feature class.</para>
        /// <para>将添加到每个新注记要素类的后缀。此后缀将追加到每个新注记要素类的源要素类的名称中。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Annotation Suffix")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _anno_suffix { get; set; } = null;


        /// <summary>
        /// <para>Extent</para>
        /// <para><xdoc>
        ///   <para>Specifies the extent that contains the labels to convert to annotation.</para>
        ///   <bulletList>
        ///     <bullet_item>Default—The extent will be based on the maximum extent of all participating inputs. This is the default.</bullet_item><para/>
        ///     <bullet_item>Union of Inputs—The extent will be based on the maximum extent of all inputs.</bullet_item><para/>
        ///     <bullet_item>Intersection of Inputs—The extent will be based on the minimum area common to all inputs.</bullet_item><para/>
        ///     <bullet_item>Current Display Extent—The extent is equal to the visible display. The option is not available when there is no active map.</bullet_item><para/>
        ///     <bullet_item>As Specified Below—The extent will be based on the minimum and maximum extent values specified.</bullet_item><para/>
        ///     <bullet_item>Browse—The extent will be based on an existing dataset.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定包含要转换为注释的标注的范围。</para>
        ///   <bulletList>
        ///     <bullet_item>默认值 - 范围将基于所有参与输入的最大范围。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>输入并集 - 范围将基于所有输入的最大范围。</bullet_item><para/>
        ///     <bullet_item>输入交点 - 范围将基于所有输入共有的最小面积。</bullet_item><para/>
        ///     <bullet_item>当前显示范围 - 范围等于可见显示。当没有活动地图时，该选项不可用。</bullet_item><para/>
        ///     <bullet_item>如下所述 - 范围将基于指定的最小和最大范围值。</bullet_item><para/>
        ///     <bullet_item>浏览 - 范围将基于现有数据集。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Extent")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _extent { get; set; } = null;


        /// <summary>
        /// <para>Convert unplaced labels to unplaced annotation</para>
        /// <para><xdoc>
        ///   <para>Specifies whether unplaced annotation will be created from unplaced labels.
        ///   <bulletList>
        ///     <bullet_item>Unchecked—Annotation will only be created for features that are currently labeled. This is the default.  </bullet_item><para/>
        ///     <bullet_item>Checked—Unplaced annotation will be stored in the annotation feature class. The status field for these annotation is set to Unplaced.  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>指定是否从未置入的标签创建未置入的批注。
        ///   <bulletList>
        ///     <bullet_item>未选中 - 仅为当前标注的要素创建注记。这是默认设置。 </bullet_item><para/>
        ///     <bullet_item>选中 - 未放置的注记将存储在注记要素类中。这些注释的状态字段设置为“未放置”。 </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Convert unplaced labels to unplaced annotation")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _generate_unplaced_value _generate_unplaced { get; set; } = _generate_unplaced_value._false;

        public enum _generate_unplaced_value
        {
            /// <summary>
            /// <para>GENERATE_UNPLACED</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("GENERATE_UNPLACED")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>ONLY_PLACED</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("ONLY_PLACED")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Require symbols to be selected from the symbol table</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the text symbol properties that can be edited will be restricted.
        ///   <bulletList>
        ///     <bullet_item>Unchecked—All text symbol properties can be edited. This is the default.  </bullet_item><para/>
        ///     <bullet_item>Checked—Only symbol properties that enable annotation features can be edited to maintain reference to their associated text symbol in the collection.  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>指定是否限制可编辑的文本符号属性。
        ///   <bulletList>
        ///     <bullet_item>未选中 - 可编辑所有文本符号属性。这是默认设置。 </bullet_item><para/>
        ///     <bullet_item>选中 - 仅可编辑启用注记要素的符号属性，以保留对集合中关联文本符号的引用。</bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Require symbols to be selected from the symbol table")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _require_symbol_id_value _require_symbol_id { get; set; } = _require_symbol_id_value._false;

        public enum _require_symbol_id_value
        {
            /// <summary>
            /// <para>REQUIRE_ID</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("REQUIRE_ID")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NO_REQUIRE_ID</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NO_REQUIRE_ID")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Create feature-linked annotation</para>
        /// <para><xdoc>
        ///   <para>This parameter is only available with ArcGIS Desktop Standard and ArcGIS Desktop Advanced licenses.</para>
        ///   <para>Specifies whether the output annotation feature class will be linked to the features in another feature class.
        ///   <bulletList>
        ///     <bullet_item>Unchecked—The output annotation feature class will not be linked to the features in another feature class. This is the default.  </bullet_item><para/>
        ///     <bullet_item>Checked—The output annotation feature class will be linked to the features in another feature class.  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>此参数仅适用于 ArcGIS Desktop Standard 和 ArcGIS Desktop Advanced 许可。</para>
        /// <para>指定输出注记要素类是否将链接到其他要素类中的要素。
        ///   <bulletList>
        ///     <bullet_item>未选中 - 输出注记要素类将不会链接到其他要素类中的要素。这是默认设置。 </bullet_item><para/>
        ///     <bullet_item>选中—输出注记要素类将链接到另一个要素类中的要素。</bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Create feature-linked annotation")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _feature_linked_value _feature_linked { get; set; } = _feature_linked_value._false;

        public enum _feature_linked_value
        {
            /// <summary>
            /// <para>FEATURE_LINKED</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("FEATURE_LINKED")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>STANDARD</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("STANDARD")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Create annotation when new features are added</para>
        /// <para><xdoc>
        ///   <para>Specifies whether annotation will be created when new features are added to the linked feature class if the Create feature-linked annotation parameter is checked.
        ///   <bulletList>
        ///     <bullet_item>Checked—Feature-linked annotation will be created when new features are added to the linked feature class. This is the default.  </bullet_item><para/>
        ///     <bullet_item>Unchecked—Feature-linked annotation will not be created when new features are added to the linked feature class.  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>指定如果选中创建要素链接注记参数，则在将新要素添加到链接要素类时是否创建注记。
        ///   <bulletList>
        ///     <bullet_item>选中 - 将新要素添加到链接要素类时，将创建要素链接注记。这是默认设置。 </bullet_item><para/>
        ///     <bullet_item>未选中 - 将新要素添加到链接要素类时，将不会创建要素链接注记。</bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Create annotation when new features are added")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _auto_create_value _auto_create { get; set; } = _auto_create_value._true;

        public enum _auto_create_value
        {
            /// <summary>
            /// <para>AUTO_CREATE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("AUTO_CREATE")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NO_AUTO_CREATE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NO_AUTO_CREATE")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Update annotation when feature's shape is modified</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the position of annotation will be updated when the shape of the linked feature is updated if the Create feature-linked annotation parameter is checked.
        ///   <bulletList>
        ///     <bullet_item>Checked—The position of the annotation will be updated when the shape of the linked feature is modified. This is the default.  </bullet_item><para/>
        ///     <bullet_item>Unchecked—The position of the annotation will not be updated when the shape of the linked feature is modified.  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>指定在选中创建要素链接注释参数时，更新链接要素的形状时是否更新注释的位置。
        ///   <bulletList>
        ///     <bullet_item>选中 - 修改链接要素的形状时，将更新注记的位置。这是默认设置。 </bullet_item><para/>
        ///     <bullet_item>未选中 - 修改链接要素的形状时，注记的位置将不会更新。</bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Update annotation when feature's shape is modified")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _update_on_shape_change_value _update_on_shape_change { get; set; } = _update_on_shape_change_value._true;

        public enum _update_on_shape_change_value
        {
            /// <summary>
            /// <para>SHAPE_UPDATE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("SHAPE_UPDATE")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NO_SHAPE_UPDATE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NO_SHAPE_UPDATE")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Output Layer</para>
        /// <para>The group layer that will contain the generated annotation. When working in the Catalog pane, you can use the Save To Layer File tool to write the output group layer to a layer file. When using ArcGIS Pro with a map open, the tool adds the group layer to the display if this option is checked in the geoprocessing options. The group layer that is created is temporary and will not persist after the session ends unless the project is saved.</para>
        /// <para>将包含生成的注记的图层组。在目录窗格中工作时，可以使用保存至图层文件工具将输出图层组写入图层文件。在打开地图的情况下使用 ArcGIS Pro 时，如果在地理处理选项中选中了此选项，则该工具会将图层组添加到显示中。创建的图层组是临时的，除非保存工程，否则在会话结束后不会保留。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Layer")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _output_group_layer { get; set; } = null;


        /// <summary>
        /// <para>Updated Geodatabase</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Updated Geodatabase")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _updated_geodatabase { get; set; }


        /// <summary>
        /// <para>Convert</para>
        /// <para><xdoc>
        ///   <para>Specifies whether annotation will be converted for all layers in the map or for a single layer. The single layer must be specified.</para>
        ///   <bulletList>
        ///     <bullet_item>All layers in map—Labels will be converted to annotation for all layers in the map. This is the default.</bullet_item><para/>
        ///     <bullet_item>Single layer—Labels will be converted to annotation for a single layer. The layer must be specified.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是为地图中的所有图层还是单个图层转换注记。必须指定单层。</para>
        ///   <bulletList>
        ///     <bullet_item>地图中的所有图层 - 标注将转换为地图中所有图层的注记。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>单图层 - 标注将转换为单个图层的注记。必须指定图层。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Convert")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _which_layers_value _which_layers { get; set; } = _which_layers_value._ALL_LAYERS;

        public enum _which_layers_value
        {
            /// <summary>
            /// <para>All layers in map</para>
            /// <para>All layers in map—Labels will be converted to annotation for all layers in the map. This is the default.</para>
            /// <para>地图中的所有图层 - 标注将转换为地图中所有图层的注记。这是默认设置。</para>
            /// </summary>
            [Description("All layers in map")]
            [GPEnumValue("ALL_LAYERS")]
            _ALL_LAYERS,

            /// <summary>
            /// <para>Single layer</para>
            /// <para>Single layer—Labels will be converted to annotation for a single layer. The layer must be specified.</para>
            /// <para>单图层 - 标注将转换为单个图层的注记。必须指定图层。</para>
            /// </summary>
            [Description("Single layer")]
            [GPEnumValue("SINGLE_LAYER")]
            _SINGLE_LAYER,

        }

        /// <summary>
        /// <para>Feature Layer</para>
        /// <para>The layer with the annotation to convert when the Convert parameter is set to Single layer. This layer must be in the map.</para>
        /// <para>当 Convert 参数设置为单层时，具有要转换的注记的图层。此图层必须位于地图中。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Feature Layer")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _single_layer { get; set; } = null;


        /// <summary>
        /// <para>Convert labels from all layers to a single output feature class</para>
        /// <para><xdoc>
        ///   <para>Specifies whether labels will be converted to individual annotation feature classes or to a single annotation feature class. If converting to a single annotation feature class, the annotation cannot be feature-linked.
        ///   <bulletList>
        ///     <bullet_item>Checked—Labels from all layers will be converted to a single annotation feature class.  </bullet_item><para/>
        ///     <bullet_item>Unchecked—Labels will be converted to individual annotation feature classes that correspond to their layers. This is the default.  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>指定是将标注转换为单个注记要素类还是转换为单个注记要素类。如果转换为单个注记要素类，则无法将注记与要素相关联。
        ///   <bulletList>
        ///     <bullet_item>选中 - 所有图层的标注将转换为单个注记要素类。</bullet_item><para/>
        ///     <bullet_item>未选中 - 标注将转换为与其图层相对应的单个注记要素类。这是默认设置。 </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Convert labels from all layers to a single output feature class")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _multiple_feature_classes_value _multiple_feature_classes { get; set; } = _multiple_feature_classes_value._false;

        public enum _multiple_feature_classes_value
        {
            /// <summary>
            /// <para>SINGLE_FEATURE_CLASS</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("SINGLE_FEATURE_CLASS")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>FEATURE_CLASS_PER_FEATURE_LAYER</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("FEATURE_CLASS_PER_FEATURE_LAYER")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Merge similar label classes</para>
        /// <para><xdoc>
        ///   <para>Specifies whether similar label classes will be merged when the Convert labels from all layers to a single output feature class parameter is checked.
        ///   <bulletList>
        ///     <bullet_item>Checked—Label classes with similar properties will be merged when the Convert labels from all layers to a single output feature class parameter is checked.  </bullet_item><para/>
        ///     <bullet_item>Unchecked—Label classes will not be merged when the Convert labels from all layers to a single output feature class parameter is checked. This is the default.  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>指定选中将所有图层的标注转换为单个输出要素类参数时是否合并相似的标注类。
        ///   <bulletList>
        ///     <bullet_item>选中 - 选中将所有图层的标注转换为单个输出要素类参数时，将合并具有相似属性的标注类。</bullet_item><para/>
        ///     <bullet_item>未选中 - 选中将所有图层的标注转换为单个输出要素类参数时，将不会合并标注类。这是默认设置。 </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Merge similar label classes")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _merge_label_classes_value _merge_label_classes { get; set; } = _merge_label_classes_value._false;

        public enum _merge_label_classes_value
        {
            /// <summary>
            /// <para>MERGE_LABEL_CLASS</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("MERGE_LABEL_CLASS")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NO_MERGE_LABEL_CLASS</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NO_MERGE_LABEL_CLASS")]
            [GPEnumValue("false")]
            _false,

        }

        public ConvertLabelsToAnnotation SetEnv(object configKeyword = null)
        {
            base.SetEnv(configKeyword: configKeyword);
            return this;
        }

    }

}